- if ::Gitlab::CurrentSettings.custom_project_templates_enabled?
  %section.settings.as-custom-project-templates.no-animate#js-custom-project-templates-settings{ class: ('expanded' if expanded), data: { qa_selector: 'custom_project_template_container' } }
    .settings-header
      %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
        = _('Custom project templates')
      = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
        = expanded ? _('Collapse') : _('Expand')
      %p.gl-text-secondary
        - link = link_to('', help_page_path('administration/custom_project_templates.md'))
        = safe_format(s_('AdminSettings|Select a group to use as a source of custom templates for new projects. %{link_start}Learn more%{link_end}.'), tag_pair(link, :link_start, :link_end))
    .settings-content

      = gitlab_ui_form_for @application_setting, url: templates_admin_application_settings_path(anchor: 'js-custom-project-templates-settings') do |f|
        = form_errors(@application_setting)

        .js-vue-group-select{ data: { label: _('Select group'), input_name: 'application_setting[custom_project_templates_group_id]', input_id: 'application_setting_file_template_project_id', selected: @application_setting.custom_project_templates_group_id, clearable: 'true' } }

        = f.submit _('Save changes'), pajamas_button: true, data: { qa_selector: 'save_changes_button' }
